package ed.hbut.supermarket1.mapper;

import ed.hbut.supermarket1.dto.MerchandiseDto;
import ed.hbut.supermarket1.dto.SaleDto;
import ed.hbut.supermarket1.entity.Merchandise;
import ed.hbut.supermarket1.entity.Sale;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SaleMapper {


    @Select("select * from sales ")
    List<Sale> getAllSale();


    List<MerchandiseDto> getMerchandiseBySaleId(int id);


    void addMerchandiseSales(SaleDto sale);

    void addSale(Sale sale);

    void deleteSale(int id);

    void deleteMerchandiseSale(int id);

}
